package com.lin.manager.pay.callback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @作者: 林江
 * @创建时间: 2024/4/21
 * @功能: 支付的回调接口，如阿里云，异步回调此接口，从而更新订单的状态
 */
@Slf4j
@RestController
public class PayController {

    /**
     * 支付宝支付
     *
     * @return
     */
    @RequestMapping("/alipay/notify_url")
    public String aliyunNotifyUrl() {
        try {
            return "success";
        } catch (Exception e) {
            return "fail";
        }
    }

    /**
     * 微信支付
     *
     * @return
     */
    @RequestMapping("/wxpay/notify_url")
    public String tencentyunNotifyUrl() {
        try {
            return "success";
        } catch (Exception e) {
            return "fail";
        }
    }

}
